package com.test.practice.reflact.bridgeandsynthetic;

import java.lang.reflect.Method;

/**
 * BridgeSynthetic--Practice
 * https://my.oschina.net/u/2474629/blog/1503235
 * Java Method 桥接和复合方法
 *
 * @author: Jovi
 * @createTime: 2018-01-16 16:57
 **/
public class BridgeSynthetic {
    interface GenericInterface<E> {
        void function(E e);
    }

    class Bridge implements GenericInterface<String> {

        @Override
        public void function(String s) {
        }

    }

    public static void main(String[] args) {
        Method[] methods = Bridge.class.getDeclaredMethods();
        for (Method method : methods) {
            System.out.println(method.toString()+" is Bridge:"+method.isBridge()+" is Synthetic:"+ method.isSynthetic());
        }
    }


}
